-
Notifications
You must be signed in to change notification settings - Fork 17
Mrd/new nodes management system #654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Math-R
wants to merge
44
commits into
main
Choose a base branch
from
mrd/new-nodes-management-system
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-first step to transform trainrunSection.nbOfStops, in actual nodes
Signed-off-by: Louis Greiner <[email protected]>
Signed-off-by: Clara Ni <[email protected]>
`TrainrunsectionHelper.getTravelTime()` computes the new travel time of a trainrunSection, either by using the `travelTimeFactor` and the current travel time of the section, or by using the total trainrun travel time and the sum of the new travel times computed up to that point. This logic can be split into 2 independent functions, which will be used depending on whether the considered section is the last one to compute or not. Signed-off-by: Clara Ni <[email protected]>
Until now, a time structure has represented one or several trainrun sections without any stops, so it could be described by its departure and arrival times (right and left) and its travel time. Since we are now going to handle several trainrun sections that include stops, we need to add a new property to store the total stop time in the time structure. Signed-off-by: Clara Ni <[email protected]>
…masked The behavior is pretty much the same as when a node is a non-stop node, except when updating the travel time, because we need to take into account the stop times of the reduced nodes. Signed-off-by: Clara Ni <[email protected]>
…ion tab Signed-off-by: Clara Ni <[email protected]>
…ode() replaceIntermediateStopWithNode() recomputes a bunch of transition position stuff. At import time, tt was working with incorrect node positions, routing everything to the (0, 0) position. This causes transition positions to be mis-rendered. Instead, set the node position at initialization, before calling replaceIntermediateStopWithNode(). That way the function can work with the final node position. As a bonus, the "new node" event is fired with the correct node position. Signed-off-by: Simon Ser <[email protected]> Fixes: 435f1c6 ("import: handle importing old files with numberOfStops")
- Add createViewObjectForCollapsedChain() static method to handle path routing between start/end nodes - Replace standard TrainrunSectionViewObject creation with custom method for collapsed chains - Path now correctly goes from first visible node to last visible node instead of using primary section's path
Signed-off-by: Simon Ser <[email protected]>
…hain Signed-off-by: Simon Ser <[email protected]>
TrainrunSectionViewObject will represent multiple trainrun sections soon. Add a helper to get the parent trainrun to reduce reliance on a single trainrun. Signed-off-by: Simon Ser <[email protected]>
This makes it clear that there isn't a single trainrun section per TrainrunSectionViewObject: a single TrainrunSectionViewObject can hold multiple sections. The full collapsed chain is stored. For now, blindly replace trainrunSection with trainrunSections[0], to be cleaned up in future commits. Signed-off-by: Simon Ser <[email protected]>
Signed-off-by: Simon Ser <[email protected]>
Signed-off-by: Simon Ser <[email protected]>
The TrainrunSectionViewObject already contains the full chain, no need to re-compute it. Signed-off-by: Simon Ser <[email protected]>
…Key() We were only using the first trainrun section's path here. Expose a getPath() method to get a view object's path. We need to call it from inside generateKey() so drop the static attribute. While at it, make the generateKey() helper function private because it shouldn't be called from elsewhere. Signed-off-by: Simon Ser <[email protected]>
Target arrival was included twice, and source arrival was missing. Signed-off-by: Simon Ser <[email protected]>
We were only grabbing metadata from the first section, but we need to make the key change when the last section changes. Signed-off-by: Simon Ser <[email protected]>
Instead, grab the path from TrainrunSectionViewObject.getPath(). We need to update a few functions to take the veiw object instead of the first trainrun section. Signed-off-by: Simon Ser <[email protected]>
This function overwrites a trainrun section's path. Instead, pick the right section (first or last) when computing path-related outputs. Signed-off-by: Simon Ser <[email protected]>
Further down, these two calls return the same values:
this.getTrainrun().getTrainrunFrequency().frequency
this.getTrainrun().getTrainrunFrequency().offset
Signed-off-by: Simon Ser <[email protected]>
…ect.generateKey() Only the source matters for the first section, the target is handled by the last section of the chain. Same as this commit, but for the consecutive time: 9689208 Signed-off-by: Simon Ser <[email protected]>
…ainrunSectionViewObject
…WithCollapsed support to avoid duplication
…inrunSection param -Remove TrainrunSection parameter support (accept only TrainrunSectionViewObject) -Merge duplicate switch statements into single switch -Merge Source/Target and Departure/Arrival into single case
-use complete path for collapsed nodes in text rotation
…pec accordingly to the isCollapsed's model change
Signed-off-by: Simon Ser <[email protected]>
Signed-off-by: Simon Ser <[email protected]>
This commit addresses issue: OpenRailAssociation/osrd#13292 Details: - Adds new component GlobalNodesManagementComponent in app/view/editor-edit-tools-view-component - The new component controls the isCollapsed state of the nodes - Adds EN and FR translations for the new component - Adds the new component to the existing EditorEditToolsViewComponent panel
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Issues
Checklist
documentation/